home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 317 / asmsrc / frags.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  1.5 KB  |  44 lines

  1. /* frags.h - Header file for the frag concept. */
  2.  
  3. /* Copyright (C) 1987 Free Software Foundation, Inc.
  4.  
  5. This file is part of Gas, the GNU Assembler.
  6.  
  7. The GNU assembler is distributed in the hope that it will be
  8. useful, but WITHOUT ANY WARRANTY.  No author or distributor
  9. accepts responsibility to anyone for the consequences of using it
  10. or for whether it serves any particular purpose or works at all,
  11. unless he says so in writing.  Refer to the GNU Assembler General
  12. Public License for full details.
  13.  
  14. Everyone is granted permission to copy, modify and redistribute
  15. the GNU Assembler, but only under the conditions described in the
  16. GNU Assembler General Public License.  A copy of this license is
  17. supposed to have been given to you along with the GNU Assembler
  18. so you can know your rights and responsibilities.  It should be
  19. in a file named COPYING.  Among other things, the copyright
  20. notice and this notice must be preserved on all copies.  */
  21.  
  22. extern struct obstack    frags;
  23.                 /* Frags ONLY live in this obstack. */
  24.                 /* We use obstack_next_free() macro */
  25.                 /* so please don't put any other objects */
  26.                 /* on this stack! */
  27.  
  28. /*
  29.  * A macro to speed up appending exactly 1 char
  30.  * to current frag.
  31.  */
  32. /* JF changed < 1 to <= 1 to avoid a race conditon */
  33. #define FRAG_APPEND_1_CHAR(datum)    \
  34. {                    \
  35.     if (obstack_room( &frags ) <= 1) {\
  36.         frag_wane (frag_now);    \
  37.         frag_new (0);        \
  38.     }                \
  39.     obstack_1grow( &frags, datum );    \
  40. }
  41.       
  42.  
  43. /* end: frags.h */
  44.